//
//  NSString+LZYNSString.h
//  瀚宇悟道-控件封装
//
//  Created by 小宇 on 2017/4/19.
//  Copyright © 2017年 刘占宇个人项目. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <Photos/Photos.h>

@interface NSString (LZYNSString)
- (NSString *)replaceHTML;//替换HTML代码

+ (BOOL)isEmpty:(NSString *)Str;

+ (BOOL)isEmpty:(NSString *)Str WithEmptyshowBottomWithText:(NSString *)showBottomWithText;

# pragma mark --- 手机号校验
- (BOOL)checkTel;

# pragma mark --- 邮箱校验
- (BOOL) validateEmail;

# pragma mark --- 传真,固话校验
- (BOOL)checkFaxNumber;

# pragma mark --- ip地址校验
- (BOOL)checkIpAddress;

# pragma mark --- 阿拉伯数字转中文格式
+(NSString *)translation:(NSString *)arebic;

# pragma mark --- 字符串中是否含有中文
+ (BOOL)checkIsChinese:(NSString *)string;

# pragma mark --- 判断该字符串是不是一个有效的URL
- (BOOL)isValidUrl;

# pragma mark --- 根据图片名 判断是否是图片
- (BOOL)isImage;

# pragma mark --- 根据图片名 判断是否是gif图
- (BOOL)isGifImage;

# pragma mark --- 拼接返回图片路径
+ (NSString *)getimgPathWithNetPath:(NSString *)netPath;

# pragma mark --- 根据图片data 判断是否是gif图
+ (BOOL)isGifWithImageData: (NSData *)data;

# pragma mark ---  根据image的data 判断图片类型
+ (NSString *)contentTypeWithImageData: (NSData *)data;

# pragma mark ---  json数组转json字符串
+ (NSString *)arrayToJsonString:(NSArray *)jsonArr;

# pragma mark ---  json字典转json字符串
+ (NSString*)dictionaryToJson:(NSDictionary *)dic;

# pragma mark ---  数组转,分割字符串
+ (NSString *)arrayToNetWorkString:(NSArray *)array;

# pragma mark ---  获取html中body里面的内容
+ (NSString *)changetext:(NSAttributedString *)htmlAttributeString;

# pragma mark ---  去除html标签
+(NSString *)filterHTML:(NSString *)html;

# pragma mark ---  去除空格和换行
+(NSString *)removeSpaceAndNewline:(NSString *)str;

# pragma mark ---  数组中字符串判空并提示
+(BOOL)NSStringIsEmptyWithArray:(NSArray *)array;

# pragma mark ---  字符串是否全部为中文
- (BOOL)isChinese;

# pragma mark --- 字符串中是否全部为数字
- (BOOL) deptNumInputShouldNumber;

-(CGSize)getSizeWithFontSize:(UIFont *)font Widh:(CGFloat)width;

- (id)mj_JSONObject;

- (CGSize)sizeWithFont:(UIFont *)font constrainedToSize:(CGSize)size;

+ (NSString *)getMediaNameWithPHAsset: (PHAsset *)asset extensionName: (NSString *)extension;
# pragma mark ---随机生成字母数字
+ (NSString *)getRandomStringWithNum:(NSInteger)num;
@end
